home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11850 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: solon.com!not-for-mail
  2. From: kremser@sbox.tu-graz.ac.at (Herbert Kremser)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated
  4. Subject: Re: const pointer confusion...
  5. Followup-To: comp.lang.c,comp.lang.c.moderated
  6. Date: 26 Mar 1996 18:55:55 -0600
  7. Organization: Graz University of Technology, Austria
  8. Sender: clc@solutions.solon.com
  9. Approved: clc@solutions.solon.com
  10. Message-ID: <4ja3mr$p5v@solutions.solon.com>
  11. References: <4j06gm$7oa@solutions.solon.com> <4j41hs$nku@solutions.solon.com>
  12. NNTP-Posting-Host: solutions.solon.com
  13. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  14.  
  15. The Amorphous Mass (robinson@blue.weeg.uiowa.edu) wrote:
  16. :   Also, there's
  17. :   4) const int const *p;
  18. :   Which is a constant pointer to a constant integer; neither *p nor 
  19. : p can change.
  20.  
  21. Not true.
  22. 4 gives  warning: duplicate `const'  or something like that.
  23. It's rather the same as 1 or 3.
  24.  
  25. What you mean would be
  26. 4)  int const * const p;
  27.  
  28. Herbert
  29.  
  30. -- 
  31. Herbert Kremser                                      |  "On the Internet,
  32. kremser@flinux.tu-graz.ac.at                         |   nobody knows
  33. kremser@sbox.tu-graz.ac.at                           |   you're a dog." 
  34.